//
//  UIImage+Fit.m
//  LotteryTicket
//
//  Created by Ansen on 15-1-25.
//  Copyright (c) 2015年 Ansen. All rights reserved.
//

#import "UIImage+Fit.h"

@implementation UIImage (Fit)

+(UIImage *)resizeImage:(NSString *)imgName
{
    return [[UIImage imageNamed:imgName] resizeImage];
}

-(UIImage *)resizeImage
{
    CGFloat leftCap = self.size.width * 0.5;
    CGFloat topCap = self.size.height * 0.5;
    return [self stretchableImageWithLeftCapWidth:leftCap topCapHeight:topCap];
}

@end
